package com.roncoo.course.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.time.LocalDate;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author wdf
 * @since 2021-03-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="EduCourse对象", description="")
public class EduCourse extends Model<EduCourse> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "课程 主键")
    @TableId(value = "cid", type = IdType.AUTO)
    private Integer cid;

    @ApiModelProperty(value = "教师Id")
    private Integer lecturerId;

    @ApiModelProperty(value = "课程分类1")
    private Integer subjectId;

    @ApiModelProperty(value = "课程的标题")
    private String title;

    @ApiModelProperty(value = "原始价格")
    private Double courseOriginal;

    @ApiModelProperty(value = "会员价格")
    private Double courseSvip;

    @ApiModelProperty(value = "课程封面图片")
    private String cover;

    @ApiModelProperty(value = "乐观锁(可能在秒杀是会用到)")
    private Integer version;

    @ApiModelProperty(value = "课程状态(0 未发布， 1 已发布)")
    private Integer status;

    @ApiModelProperty(value = "逻辑删除(1,true 0 false)")
    private Integer isDeleted;

    @ApiModelProperty(value = "课程折扣")
    private Double courseDiscount;

    @ApiModelProperty(value = "购买人数")
    private Integer countBuy;

    @ApiModelProperty(value = "学习人数")
    private Integer countStudy;

    @ApiModelProperty(value = "总课时")
    private Integer peroidTotal;

    @ApiModelProperty(value = "是否免费(0,1) 1免费   0收费")
    private Integer isFree;

    @ApiModelProperty(value = "是否上架(0,1)")
    private Integer isPutaway;

    @ApiModelProperty(value = "排序")
    private Integer csort;

    @ApiModelProperty(value = "课程描述的id")
    private Integer inid;

//    private Integer zhuanquid;

    private LocalDate cCreate=LocalDate.now();

    @Override
    protected Serializable pkVal() {
        return this.cid;
    }

}
